﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.Store.ViewModels
@using MvcMall.Framework.MvcPager;
@model StoreListSearchModel
<!DOCTYPE html>
<html>
<head>
    <title>网商管理</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
</head>
<body>
    <div  id="pageList">
        <script type="text/javascript">
            $(function () {
                $("#tabs").tabs({
                    cache: false
                });
            });  
        </script>
        <div id="tabs">
            <ul>
                <li><a href="#menuList">网商审核</a> </li>
            </ul>
            <div id="menuList">
                @using (Html.BeginForm())
                {
                    <table width="100%">
                        <tr>
                            <td>
                                @Html.LabelFor(m => m.UserName)
                            </td>
                            <td>
                                @Html.TextBoxFor(m => m.UserName, new { @style = "width:100px;" })
                            </td>
                            <td>
                                @Html.LabelFor(m => m.PromoteUser)
                            </td>
                            <td>
                                @Html.TextBoxFor(m => m.PromoteUser, new { @style = "width:100px;" })
                            </td>
                            <td>
                                @Html.LabelFor(m => m.StoreName)
                            </td>
                            <td>
                                @Html.TextBoxFor(m => m.StoreName, new { @style = "width:100px;" })
                            </td>
                            <td>
                                @Html.LabelFor(m => m.StoreType)
                            </td>
                            <td>
                                @Html.DropDownListFor(m => m.StoreType, ViewData["StoreTypeList"] as IEnumerable<SelectListItem>)
                            </td>
                            <td>
                                @Html.LabelFor(m => m.StoreStatus)
                            </td>
                            <td>
                                @Html.DropDownListFor(m => m.StoreStatus, ViewData["StoreStatusList"] as IEnumerable<SelectListItem>)
                            </td>
                            <td>
                                <input type="submit" value="查询" />
                            </td>
                        </tr>
                    </table>
                }
                <div>
                    <table width="100%">
                        <tr>
                            <th>
                                网商ID
                            </th>
                            <th>
                                店主姓名
                            </th>
                            <th>
                                店铺名称
                            </th>
                            <th>
                                店铺类别
                            </th>
                            <th>
                                网商等级
                            </th>
                            <th>
                                网商推荐人
                            </th>
                            <th>
                                申请时间
                            </th>
                            <th>
                            </th>
                        </tr>
                        @if (Model != null && Model.Stores != null && Model.Stores.Count > 0)
                        {
                            foreach (var item in Model.Stores)
                            {
                            <tr>
                                <td>
                                    @item.StoreId
                                </td>
                                <td>
                                    @item.OwnerName
                                </td>
                                <td>
                                    @item.StoreName
                                </td>
                                <td>
                                    @item.StoreTypeNames
                                </td>
                                <td>
                                    @item.StoreGradeName
                                </td>
                                <td>
                                    @item.PromoteUser
                                </td>
                                <td>
                                    @item.CreateTime
                                </td>
                                <td>
                                    @Html.ActionLink("查看详情", "StoreDetails", new { @storeId = item.StoreId })
                                </td>
                            </tr>
                            }
                        }
                    </table>
                    @if (Model != null && Model.Stores != null && Model.Stores.Count > 0)
                    {
                        @Html.AjaxPager(Model.Stores, new AjaxOptions { UpdateTargetId = "pageList" })
                    }
                </div>
            </div>
        </div>
    </div>
</body>
</html>
